﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="dialog_select_company.aspx.cs" Inherits="Donal.Xms.Web.qianyi.dialog.dialog_select_company" %>

<%@ Import Namespace="Donal.Xms.Common" %>

<!DOCTYPE html>
<html>
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,initial-scale=1.0,user-scalable=no" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <title>选择公司</title>
    <link rel="stylesheet" type="text/css" href="../skin/icon/iconfont.css" />
    <link rel="stylesheet" type="text/css" href="../skin/default/style.css" />
    <script type="text/javascript" charset="utf-8" src="../../scripts/jquery/jquery-1.11.2.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="../../scripts/datepicker/WdatePicker.js"></script>
    <script type="text/javascript" charset="utf-8" src="../js/common.js"></script>
    <script src="../../scripts/jquery/jquery.cookie.js"></script>

    <script type="text/javascript">
        var api = top.dialog.get(window); //获取父窗体对象

        $(function () {
            //设置按钮及事件
            api.button([{
                value: '确定',
                callback: function () {
                    submitForm();
                    return false;
                },
                autofocus: true
            }, {
                value: '取消',
                callback: function () {
                }
            }
            ]);

            function submitForm() {
                $("input[type='radio']:checked").each(function () {
                    var id = $(this).attr("id").replace("rbt", "");
                    var title = $("#hidName" + id).val();

                    $(api.data).find("#txtCompany").val(title);
                    $(api.data).find("[id$='hidParentId']").val(id);

                    api.close().remove();
                });
            };

        });

    </script>
    <style>
        div.default {
            margin: 0;
            padding: 0;
            font-family: "Microsoft YaHei",Verdana;
            font-size: 12px;
        }

            div.default a, div.default span {
                display: block;
                float: left;
                margin: 2px 0 0 -1px;
                padding: 4px 12px;
                line-height: 20px;
                height: 20px;
                border: 1px solid #e1e1e1;
                background: #fff;
                color: #333;
                text-decoration: none;
            }

                div.default span:first-child {
                    border-left: 1px solid #e1e1e1;
                }

                div.default a:hover {
                    color: #666;
                    background: #eee;
                }

                div.default span.current {
                    color: #fff;
                    background: #488FCD;
                    border-color: #488FCD;
                }

                div.default span.disabled {
                    color: #999;
                    background: #fff;
                }

        .keywords {
            margin: 1px;
            padding: 4px;
            min-height: 20px;
            line-height: 20px;
            border: 1px solid #eee;
            background: #fff;
            vertical-align: middle;
        }
    </style>
</head>


<body>
    <form id="form1" runat="server">
        <!--导航栏-->
        <div class="location">
            <a href="javascript:history.back(-1);" class="back"><i class="iconfont icon-up"></i><span>返回上一页</span></a>
            <a href="../center.aspx" class="home"><i class="iconfont icon-home"></i><span>首页</span></a>
            <i class="arrow iconfont icon-arrow-right"></i>
            <span>会员管理</span>
            <i class="arrow iconfont icon-arrow-right"></i>
            <span>所有会员</span>
        </div>
        <!--/导航栏-->

        <!--工具栏-->
        <div id="floatHead" class="toolbar-wrap">
            <div class="toolbar">
                <div class="box-wrap">
                    <a class="menu-btn"><i class="iconfont icon-more"></i></a>
                    <div class="l-list">

                        <div class="menu-list">
                            <div class="rule-single-select">
                                <asp:DropDownList ID="ddlIndustry" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlIndustry_SelectedIndexChanged">
                                    <asp:ListItem Value=" ">所有行业</asp:ListItem>
                                </asp:DropDownList>
                            </div>
                            <div class="rule-single-select">
                                <asp:DropDownList ID="ddlGroupId" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlGroupId_SelectedIndexChanged"></asp:DropDownList>
                            </div>
                            <div class="rule-single-select">
                                <asp:DropDownList ID="ddlStatus" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlStatus_SelectedIndexChanged">
                                    <asp:ListItem Value=" ">所有状态</asp:ListItem>
                                    <asp:ListItem Value="1">正常</asp:ListItem>
                                    <asp:ListItem Value="2">禁用</asp:ListItem>
                                    <asp:ListItem Value="3">待审核</asp:ListItem>
                                </asp:DropDownList>
                            </div>
                            <div class="rule-single-select">
                                <asp:DropDownList ID="ddlMonthly" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlMonthly_SelectedIndexChanged">
                                    <asp:ListItem Value=" ">月结类型</asp:ListItem>
                                    <asp:ListItem Value="1">月结</asp:ListItem>
                                    <asp:ListItem Value="2">普通</asp:ListItem>
                                </asp:DropDownList>
                            </div>


                            <asp:TextBox ID="txtStartTime" runat="server" Width="100px" CssClass="input rule-date-input" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" placeholder="添加时间"></asp:TextBox>
                            -
                            <asp:TextBox ID="txtEndTime" runat="server" Width="100px" CssClass="input rule-date-input" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" placeholder="添加时间"></asp:TextBox>
                            <style>
                                .date-input {
                                    width: 100px;
                                }
                            </style>
                        </div>
                    </div>
                    <div class="r-list">
                        <asp:TextBox ID="txtKeywords" runat="server" CssClass="keyword" />
                        <asp:LinkButton ID="lbtnSearch" runat="server" CssClass="btn-search" OnClick="btnSearch_Click"><i class="iconfont icon-search"></i></asp:LinkButton>
                    </div>
                </div>
            </div>
        </div>
        <!--/工具栏-->

        <!--列表-->
        <div class="table-container">
            <asp:Repeater ID="rptList" runat="server">
                <HeaderTemplate>
                    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="ltable">
                        <tr>
                            <th width="10%">选择</th>
                            <th width="10%">公司组</th>
                            <th align="left">公司名称</th>
                            <th width="10%">所属行业</th>
                            <th width="10%">公司类别</th>
                            <th width="10%">额度</th>
                            <th width="10%">状态</th>
                        </tr>
                </HeaderTemplate>
                <ItemTemplate>
                    <tr>
                        <td align="center">
                            <input type="radio" id="rbt<%#Eval("id")%>" name="1" style="vertical-align: middle;" />
                            <input type="hidden" id="hidName<%#Eval("id")%>" value='<%#Eval("companyName")%>' />
                        </td>
                        <td align="center"><%#new Donal.Xms.BLL.user_groups().GetTitle(Convert.ToInt32(Eval("group_id")))%></td>
                        <td align="left"><%#Eval("companyName")%></td>
                        <td align="center"><%#Eval("industry_title")%></td>
                        <td align="center"><%#Eval("user_type").ToString()=="1"?"月结":"普通"%></td>
                        <td align="center">￥<%#Eval("order_limit")%></td>
                        <td align="center"><%#GetUserStatus(Convert.ToInt32(Eval("status")))%></td>
                    </tr>
                </ItemTemplate>
                <FooterTemplate>
                    <%#rptList.Items.Count == 0 ? "<tr><td align=\"center\" colspan=\"7\">暂无会员信息</td></tr>" : ""%>
                    </table>
                </FooterTemplate>
            </asp:Repeater>
        </div>
        <!--/列表-->

        <!--内容底部-->
        <div class="line20"></div>
        <div class="pagelist">
            <div class="l-btns">
                <span>显示</span><asp:TextBox ID="txtPageNum" runat="server" CssClass="pagenum" onkeydown="return checkNumber(event);"
                    OnTextChanged="txtPageNum_TextChanged" AutoPostBack="True"></asp:TextBox><span>条/页</span>
            </div>
            <div id="PageContent" runat="server" class="default"></div>
        </div>
        <!--/内容底部-->

    </form>
</body>
</html>
